import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-10-24
 * Time: 23:19
 */
public class Test {
    public static void main(String[] args) {
        PriorityQueue priorityQueue = new PriorityQueue();
        int[] array = {8,15,10,21,34,16,12};
        priorityQueue.initElem(array);
        priorityQueue.createHeap();
        priorityQueue.headSort();
        for(int i = 0; i < priorityQueue.usedSize; i++) {
            System.out.print(priorityQueue.elem[i] + " ");
        }
    }
}
